package com.project.mapper;

import com.project.bean.CityBean;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author lyl
 * description:
 */
public interface ICityMapper {
    /**
     * 根据国家id查找城市
     *
     * @param countryId 国家id
     * @return 城市对象
     */
    @Select("select * from t_city where fk_countryId = #{countryId}")
    @ResultMap("cityMap")
    List<CityBean> findByCountryId(@Param("countryId") int countryId);
}
